Skip to content

feat: add agent skills discovery instruction to llms.txt#36

Merged
marc0olo merged 1 commit into
mainfrom
infra/llms-skills-instruction
Mar 20, 2026
Merged

feat: add agent skills discovery instruction to llms.txt#36
marc0olo merged 1 commit into
mainfrom
infra/llms-skills-instruction

Conversation

@marc0olo
Copy link
Copy Markdown
Member

@marc0olo marc0olo commented Mar 20, 2026

Summary

Replaces the single-line skills URL in llms.txt with a structured instruction block that tells AI agents how to discover and use ICP agent skills on-demand — without requiring any pre-installed skills.

Before (buried, no instruction):

Agent skills for IC development: https://skills.internetcomputer.org/.well-known/skills/index.json

After (prominent section with clear workflow):

## Agent skills

Tested implementation patterns for ICP development are available as agent skills.
Before writing any ICP code, fetch the skills index and remember the skill names and descriptions:
https://skills.internetcomputer.org/.well-known/skills/index.json

When a task matches a skill description, fetch its content on-demand from:
https://skills.internetcomputer.org/.well-known/skills/{name}/{file}

Skills contain correct dependency versions, configuration formats, and common pitfalls that prevent build failures.
Always prefer skill guidance over general documentation when both cover the same topic.

This mirrors the lazy-loading pattern that locally installed skills already use (name + description in context, full content loaded on-demand), but works over HTTP for any agent with zero setup.

Blind subagent test

To verify the instruction works in practice, a subagent was launched with no pre-installed ICP skills. The build was run locally to generate the updated llms.txt, then served via npm run preview at localhost:4322. The subagent was given the following prompt:

You are an AI coding agent helping a developer build an ICP application. You have NO pre-installed ICP skills. The developer has pasted this URL for reference: http://localhost:4322/llms.txt

Your task: The developer wants to build a Rust backend canister with Internet Identity login for a React frontend.

Fetch the llms.txt URL first. Follow whatever instructions you find there — especially regarding agent skills. Report back exactly what you did step by step.

How the subagent behaved:

  1. Fetched llms.txt from the local preview server — found the skills section immediately (it's at the top, before the 85 doc page links)
  2. Fetched index.json as instructed from skills.internetcomputer.org — discovered all 16 skills with descriptions
  3. Matched 3 relevant skills to the task based on descriptions: internet-identity, icp-cli, canister-security
  4. Fetched skill content on-demand from https://skills.internetcomputer.org/.well-known/skills/{name}/SKILL.md
  5. Extracted key implementation details before writing any code:
    • Exact dependency versions (ic-cdk = "0.19", @icp-sdk/auth, @icp-sdk/core)
    • ii: true config for local II setup in icp.yaml
    • Correct import paths (@icp-sdk/auth/client, @icp-sdk/core/agent/canister-env)
    • Pitfalls: bind msg_caller() before .await, never pass caller as argument, fetchRootKey only in local dev
    • Full working Cargo.toml with version pins and crate-type = ["cdylib"]

The subagent concluded: "An agent starting cold with only the llms.txt URL can discover all of this in three HTTP requests before writing a single line of code."

This addresses the core issue from #35 — the 15 errors and 8 failed deploys were caused by the agent ignoring skills that were available to it. With the updated llms.txt, an agent with no pre-installed skills can self-bootstrap to the same quality of guidance.

Closes #35

Replace the single-line skills URL in llms.txt with a structured
instruction block that tells AI agents to fetch the skills index,
remember skill descriptions, and load relevant skills on-demand
before writing code.

Closes #35
@marc0olo
Copy link
Copy Markdown
Member Author

@raymondk just FYI, merging this now :)

@marc0olo marc0olo merged commit 35a3939 into main Mar 20, 2026
@marc0olo marc0olo deleted the infra/llms-skills-instruction branch March 20, 2026 00:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Building an ICP Blog App with Claude Code: A Case Study in What Goes Wrong Without Skills

1 participant